Optimal. Leaf size=143 \[ \frac {B x \sqrt {b \cos (c+d x)}}{2 \sqrt {\cos (c+d x)}}+\frac {(3 A+2 C) \sqrt {b \cos (c+d x)} \sin (c+d x)}{3 d \sqrt {\cos (c+d x)}}+\frac {B \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \sin (c+d x)}{2 d}+\frac {C \cos ^{\frac {3}{2}}(c+d x) \sqrt {b \cos (c+d x)} \sin (c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.070, Rules used = {17, 3102, 2813}
\begin {gather*} \frac {(3 A+2 C) \sin (c+d x) \sqrt {b \cos (c+d x)}}{3 d \sqrt {\cos (c+d x)}}+\frac {B x \sqrt {b \cos (c+d x)}}{2 \sqrt {\cos (c+d x)}}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)}}{2 d}+\frac {C \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x) \sqrt {b \cos (c+d x)}}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 17
Rule 2813
Rule 3102
Rubi steps
\begin {align*} \int \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx &=\frac {\sqrt {b \cos (c+d x)} \int \cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx}{\sqrt {\cos (c+d x)}}\\ &=\frac {C \cos ^{\frac {3}{2}}(c+d x) \sqrt {b \cos (c+d x)} \sin (c+d x)}{3 d}+\frac {\sqrt {b \cos (c+d x)} \int \cos (c+d x) (3 A+2 C+3 B \cos (c+d x)) \, dx}{3 \sqrt {\cos (c+d x)}}\\ &=\frac {B x \sqrt {b \cos (c+d x)}}{2 \sqrt {\cos (c+d x)}}+\frac {(3 A+2 C) \sqrt {b \cos (c+d x)} \sin (c+d x)}{3 d \sqrt {\cos (c+d x)}}+\frac {B \sqrt {\cos (c+d x)} \sqrt {b \cos (c+d x)} \sin (c+d x)}{2 d}+\frac {C \cos ^{\frac {3}{2}}(c+d x) \sqrt {b \cos (c+d x)} \sin (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 75, normalized size = 0.52 \begin {gather*} \frac {\sqrt {b \cos (c+d x)} (6 B c+6 B d x+3 (4 A+3 C) \sin (c+d x)+3 B \sin (2 (c+d x))+C \sin (3 (c+d x)))}{12 d \sqrt {\cos (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.26, size = 83, normalized size = 0.58
method | result | size |
default | \(\frac {\sqrt {b \cos \left (d x +c \right )}\, \left (2 C \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+3 B \cos \left (d x +c \right ) \sin \left (d x +c \right )+6 A \sin \left (d x +c \right )+3 B \left (d x +c \right )+4 C \sin \left (d x +c \right )\right )}{6 d \sqrt {\cos \left (d x +c \right )}}\) | \(83\) |
risch | \(\frac {\sqrt {b \cos \left (d x +c \right )}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) {\mathrm e}^{i \left (d x +c \right )} B x}{{\mathrm e}^{2 i \left (d x +c \right )}+1}-\frac {i \sqrt {b \cos \left (d x +c \right )}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) {\mathrm e}^{4 i \left (d x +c \right )} C}{12 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d}-\frac {i \sqrt {b \cos \left (d x +c \right )}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) {\mathrm e}^{3 i \left (d x +c \right )} B}{4 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d}-\frac {i \sqrt {b \cos \left (d x +c \right )}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) {\mathrm e}^{2 i \left (d x +c \right )} \left (4 A +3 C \right )}{4 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d}+\frac {i \sqrt {b \cos \left (d x +c \right )}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) \left (4 A +3 C \right )}{4 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d}+\frac {i \sqrt {b \cos \left (d x +c \right )}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) {\mathrm e}^{-i \left (d x +c \right )} B}{4 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d}+\frac {i \sqrt {b \cos \left (d x +c \right )}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) {\mathrm e}^{-2 i \left (d x +c \right )} C}{12 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d}\) | \(330\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.66, size = 80, normalized size = 0.56 \begin {gather*} \frac {3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B \sqrt {b} + C \sqrt {b} {\left (\sin \left (3 \, d x + 3 \, c\right ) + 9 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (3 \, d x + 3 \, c\right ), \cos \left (3 \, d x + 3 \, c\right )\right )\right )\right )} + 12 \, A \sqrt {b} \sin \left (d x + c\right )}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 236, normalized size = 1.65 \begin {gather*} \left [\frac {3 \, B \sqrt {-b} \cos \left (d x + c\right ) \log \left (2 \, b \cos \left (d x + c\right )^{2} - 2 \, \sqrt {b \cos \left (d x + c\right )} \sqrt {-b} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - b\right ) + 2 \, {\left (2 \, C \cos \left (d x + c\right )^{2} + 3 \, B \cos \left (d x + c\right ) + 6 \, A + 4 \, C\right )} \sqrt {b \cos \left (d x + c\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{12 \, d \cos \left (d x + c\right )}, \frac {3 \, B \sqrt {b} \arctan \left (\frac {\sqrt {b \cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt {b} \cos \left (d x + c\right )^{\frac {3}{2}}}\right ) \cos \left (d x + c\right ) + {\left (2 \, C \cos \left (d x + c\right )^{2} + 3 \, B \cos \left (d x + c\right ) + 6 \, A + 4 \, C\right )} \sqrt {b \cos \left (d x + c\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{6 \, d \cos \left (d x + c\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 41.50, size = 241, normalized size = 1.69 \begin {gather*} \begin {cases} 0 & \text {for}\: c = - d x + \frac {\pi }{2} \vee c = - d x + \frac {3 \pi }{2} \\x \sqrt {b \cos {\left (c \right )}} \left (A + B \cos {\left (c \right )} + C \cos ^{2}{\left (c \right )}\right ) \sqrt {\cos {\left (c \right )}} & \text {for}\: d = 0 \\\frac {A \sqrt {b \cos {\left (c + d x \right )}} \sin {\left (c + d x \right )}}{d \sqrt {\cos {\left (c + d x \right )}}} + \frac {B x \sqrt {b \cos {\left (c + d x \right )}} \sin ^{2}{\left (c + d x \right )}}{2 \sqrt {\cos {\left (c + d x \right )}}} + \frac {B x \sqrt {b \cos {\left (c + d x \right )}} \cos ^{\frac {3}{2}}{\left (c + d x \right )}}{2} + \frac {B \sqrt {b \cos {\left (c + d x \right )}} \sin {\left (c + d x \right )} \sqrt {\cos {\left (c + d x \right )}}}{2 d} + \frac {2 C \sqrt {b \cos {\left (c + d x \right )}} \sin ^{3}{\left (c + d x \right )}}{3 d \sqrt {\cos {\left (c + d x \right )}}} + \frac {C \sqrt {b \cos {\left (c + d x \right )}} \sin {\left (c + d x \right )} \cos ^{\frac {3}{2}}{\left (c + d x \right )}}{d} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.40, size = 104, normalized size = 0.73 \begin {gather*} \frac {\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {b\,\cos \left (c+d\,x\right )}\,\left (3\,B\,\sin \left (c+d\,x\right )+12\,A\,\sin \left (2\,c+2\,d\,x\right )+3\,B\,\sin \left (3\,c+3\,d\,x\right )+10\,C\,\sin \left (2\,c+2\,d\,x\right )+C\,\sin \left (4\,c+4\,d\,x\right )+12\,B\,d\,x\,\cos \left (c+d\,x\right )\right )}{12\,d\,\left (\cos \left (2\,c+2\,d\,x\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________